package com.example.demo.mapper;

import com.example.demo.entity.WorkLogs;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

@Mapper
@Repository(value = "LogsMapper")
public interface LogsMapper {

    // 插入工作记录
    @Insert("insert into work_logs(\n" +
            "phone,\n" +
            "start_date,end_date,work_date,update_before_date,update_after_date,\n" +
            "up_amount,actual_amount,before_up_amount,after_up_amount,\n" +
            "call_method,call_name\n" +
            ")values(\n" +
            "#{phone},#{startDate},#{endDate},#{workDate},#{updateBeforeDate},#{updateAfterDate},\n" +
            "#{upAmount},#{actualAmount},#{beforeUpAmount},#{afterUpAmount},\n" +
            "#{callMethod},#{callName}\n" +
            ")")
    void insertWorkLogs(WorkLogs workLogs);
}
